home *** CD-ROM | disk | FTP | other *** search
-
-
-
- ggggeeeettttccccwwwwdddd((((3333CCCC)))) ggggeeeettttccccwwwwdddd((((3333CCCC))))
-
-
-
- NNNNAAAAMMMMEEEE
- _gggg_eeee_tttt_cccc_wwww_dddd - get pathname of current working directory
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_uuuu_nnnn_iiii_ssss_tttt_dddd_...._hhhh_>>>>
-
- _cccc_hhhh_aaaa_rrrr _****_gggg_eeee_tttt_cccc_wwww_dddd _((((_cccc_hhhh_aaaa_rrrr _****_bbbb_uuuu_ffff_,,,, _ssss_iiii_zzzz_eeee______tttt _ssss_iiii_zzzz_eeee_))))_;;;;
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- _gggg_eeee_tttt_cccc_wwww_dddd returns a pointer to the current directory pathname. The value of
- _s_i_z_e must be at least one greater than the length of the pathname to be
- returned.
-
- If _b_u_f is not _NNNN_UUUU_LLLL_LLLL, the pathname will be stored in the space pointed to
- by _b_u_f.
-
- If _b_u_f is a _NNNN_UUUU_LLLL_LLLL pointer, _gggg_eeee_tttt_cccc_wwww_dddd will obtain _s_i_z_e bytes of space using
- _mmmm_aaaa_llll_llll_oooo_cccc(3C). In this case, a subsequent call to _ffff_rrrr_eeee_eeee should be made using
- the pointer returned by _gggg_eeee_tttt_cccc_wwww_dddd as the argument. If _s_i_z_e is less than
- zero, then _gggg_eeee_tttt_cccc_wwww_dddd will obtain an appropriate amount of space. Passing a
- negative _s_i_z_e and a non-NULL _b_u_f argument will lead to undefined results.
-
- _gggg_eeee_tttt_cccc_wwww_dddd will fail if one or more of the following are true:
-
- _EEEE_AAAA_CCCC_CCCC_EEEE_SSSS A parent directory cannot be read to get its name.
-
- _EEEE_IIII_NNNN_VVVV_AAAA_LLLL _s_i_z_e is equal to 0.
-
- _EEEE_RRRR_AAAA_NNNN_GGGG_EEEE _s_i_z_e is less than the length of the pathname plus 1.
-
- EEEEXXXXAAAAMMMMPPPPLLLLEEEE
- Here is a program that prints the current working directory.
-
- _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_uuuu_nnnn_iiii_ssss_tttt_dddd_...._hhhh_>>>>
- _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_tttt_dddd_iiii_oooo_...._hhhh_>>>>
-
- _mmmm_aaaa_iiii_nnnn_((((_))))
- _{{{{
- _cccc_hhhh_aaaa_rrrr _****_cccc_wwww_dddd_;;;;
- _iiii_ffff _((((_((((_cccc_wwww_dddd _==== _gggg_eeee_tttt_cccc_wwww_dddd_((((_NNNN_UUUU_LLLL_LLLL_,,,, _6666_4444_))))_)))) _====_==== _NNNN_UUUU_LLLL_LLLL_))))
- _{{{{
- _pppp_eeee_rrrr_rrrr_oooo_rrrr_((((_""""_pppp_wwww_dddd_""""_))))_;;;;
- _eeee_xxxx_iiii_tttt_((((_2222_))))_;;;;
- _}}}}
- _((((_vvvv_oooo_iiii_dddd_))))_pppp_rrrr_iiii_nnnn_tttt_ffff_((((_""""_%%%%_ssss_\\\\_nnnn_""""_,,,, _cccc_wwww_dddd_))))_;;;;
- _ffff_rrrr_eeee_eeee_((((_cccc_wwww_dddd_))))_;;;;
- _rrrr_eeee_tttt_uuuu_rrrr_nnnn_((((_0000_))))_;;;;
- _}}}}
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- ggggeeeettttccccwwwwdddd((((3333CCCC)))) ggggeeeettttccccwwwwdddd((((3333CCCC))))
-
-
-
- SEE ALSO
- _mmmm_aaaa_llll_llll_oooo_cccc(3C).
-
- DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
- Returns _NNNN_UUUU_LLLL_LLLL with _eeee_rrrr_rrrr_nnnn_oooo set if _s_i_z_e is not large enough, or if an error
- occurs in a lower-level function.
-
- NNNNOOOOTTTTEEEESSSS
- _gggg_eeee_tttt_cccc_wwww_dddd uses the end part of the buffer ( _b_u_f + _s_i_z_e - 1) as temporary
- space. Be sure that the _s_i_z_e argument accurately reflects the space
- allocated to the buffer.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-